/***********************************************************************
 * Module:  Voiture.java
 * Author:  qmpq
 * Purpose: Defines the Class Voiture
 ***********************************************************************/

package chrono;

import java.util.*;

public class Voiture {
   private String numeroVoiture_;
   private String couleur_;
   private String lienSurImage_;
   private int nombreDeTours_;
   private float tempsEstimeTour_;
   private boolean voitureActive_;
   private float quantiteMoyenneEssenceParTour_;
   private int nombreToursEffectues_;
   private int nombreToursDepuisDernierRelais_;
   private int numeroRelaisEnCours_;
   private java.util.Date heurePrevueProchainPassage_;
   
   private Pilote piloteActuel_;
   private java.util.List<Pilote> collectionPilotes_;
   private java.util.List<Top> collectionTops_;
   
   
   /** @pdGenerated default getter */
   public java.util.List<Pilote> getCollectionPilotes_() {
      if (collectionPilotes_ == null)
         collectionPilotes_ = new java.util.ArrayList<Pilote>();
      return collectionPilotes_;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorCollectionPilotes_() {
      if (collectionPilotes_ == null)
         collectionPilotes_ = new java.util.ArrayList<Pilote>();
      return collectionPilotes_.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newCollectionPilotes_ */
   public void setCollectionPilotes_(java.util.List<Pilote> newCollectionPilotes_) {
      removeAllCollectionPilotes_();
      for (java.util.Iterator iter = newCollectionPilotes_.iterator(); iter.hasNext();)
         addCollectionPilotes_((Pilote)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newPilote */
   public void addCollectionPilotes_(Pilote newPilote) {
      if (newPilote == null)
         return;
      if (this.collectionPilotes_ == null)
         this.collectionPilotes_ = new java.util.ArrayList<Pilote>();
      if (!this.collectionPilotes_.contains(newPilote))
         this.collectionPilotes_.add(newPilote);
   }
   
   /** @pdGenerated default remove
     * @param oldPilote */
   public void removeCollectionPilotes_(Pilote oldPilote) {
      if (oldPilote == null)
         return;
      if (this.collectionPilotes_ != null)
         if (this.collectionPilotes_.contains(oldPilote))
            this.collectionPilotes_.remove(oldPilote);
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllCollectionPilotes_() {
      if (collectionPilotes_ != null)
         collectionPilotes_.clear();
   }
   /** @pdGenerated default getter */
   public java.util.List<Top> getCollectionTops_() {
      if (collectionTops_ == null)
         collectionTops_ = new java.util.ArrayList<Top>();
      return collectionTops_;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorCollectionTops_() {
      if (collectionTops_ == null)
         collectionTops_ = new java.util.ArrayList<Top>();
      return collectionTops_.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newCollectionTops_ */
   public void setCollectionTops_(java.util.List<Top> newCollectionTops_) {
      removeAllCollectionTops_();
      for (java.util.Iterator iter = newCollectionTops_.iterator(); iter.hasNext();)
         addCollectionTops_((Top)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newTop */
   public void addCollectionTops_(Top newTop) {
      if (newTop == null)
         return;
      if (this.collectionTops_ == null)
         this.collectionTops_ = new java.util.ArrayList<Top>();
      if (!this.collectionTops_.contains(newTop))
      {
         this.collectionTops_.add(newTop);
        // ((Object) newTop).setVoiture_(this);      
      }
   }
   
   /** @pdGenerated default remove
     * @param oldTop */
   public void removeCollectionTops_(Top oldTop) {
      if (oldTop == null)
         return;
      if (this.collectionTops_ != null)
         if (this.collectionTops_.contains(oldTop))
         {
            this.collectionTops_.remove(oldTop);
            //oldTop.setVoiture_((Voiture)null);
         }
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllCollectionTops_() {
      if (collectionTops_ != null)
      {
         Top oldTop;
         for (java.util.Iterator iter = getIteratorCollectionTops_(); iter.hasNext();)
         {
            oldTop = (Top)iter.next();
            iter.remove();
            //oldTop.setVoiture_((Voiture)null);
         }
      }
   }
   
   public java.util.Collection<TrainPneu> collectionTrainPneu_;
   
   public void ajouterVoiture() {
      // TODO: implement
   }
   
   public void modifierVoiture() {
      // TODO: implement
   }
   
   public void supprimerVoiture() {
      // TODO: implement
   }
   
   public void ajouterPilote() {
      // TODO: implement
   }
   
   public void supprimerPilote() {
      // TODO: implement
   }
   
   
   /** @pdGenerated default getter */
   public java.util.Collection<TrainPneu> getCollectionTrainPneu_() {
      if (collectionTrainPneu_ == null)
         collectionTrainPneu_ = new java.util.Vector<TrainPneu>();
      return collectionTrainPneu_;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorCollectionTrainPneu_() {
      if (collectionTrainPneu_ == null)
         collectionTrainPneu_ = new java.util.Vector<TrainPneu>();
      return collectionTrainPneu_.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newCollectionTrainPneu_ */
   public void setCollectionTrainPneu_(java.util.Collection<TrainPneu> newCollectionTrainPneu_) {
      removeAllCollectionTrainPneu_();
      for (java.util.Iterator iter = newCollectionTrainPneu_.iterator(); iter.hasNext();)
         addCollectionTrainPneu_((TrainPneu)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newTrainPneu */
   public void addCollectionTrainPneu_(TrainPneu newTrainPneu) {
      if (newTrainPneu == null)
         return;
      if (this.collectionTrainPneu_ == null)
         this.collectionTrainPneu_ = new java.util.Vector<TrainPneu>();
      if (!this.collectionTrainPneu_.contains(newTrainPneu))
         this.collectionTrainPneu_.add(newTrainPneu);
   }
   
   /** @pdGenerated default remove
     * @param oldTrainPneu */
   public void removeCollectionTrainPneu_(TrainPneu oldTrainPneu) {
      if (oldTrainPneu == null)
         return;
      if (this.collectionTrainPneu_ != null)
         if (this.collectionTrainPneu_.contains(oldTrainPneu))
            this.collectionTrainPneu_.remove(oldTrainPneu);
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllCollectionTrainPneu_() {
      if (collectionTrainPneu_ != null)
         collectionTrainPneu_.clear();
   }

}